//
//  HJTeamHeader.m
//  project
//
//  Created by hu on 2019/4/4.
//  Copyright © 2019 健健. All rights reserved.
//

#import "HJTeamHeader.h"
#import "YFJourneyModel.h"

@interface HJTeamHeader ()
@property (weak, nonatomic) IBOutlet UIView *BGview;

/**
 左边背景View
 */
@property (weak, nonatomic) IBOutlet UIView *leftBgView;
/**
 左边title
 */
@property (weak, nonatomic) IBOutlet UILabel *letfTitle;
/**
 左边头像父视图
 */
@property (weak, nonatomic) IBOutlet UIView *leftSubHead;
/**
 左边头像图片
 */
@property (weak, nonatomic) IBOutlet UIImageView *leftHeadImage;
/**
 左边昵称
 */
@property (weak, nonatomic) IBOutlet UILabel *leftName;
/**
 左边年龄
 */
@property (weak, nonatomic) IBOutlet UILabel *leftYear;
/**
 左边性别
 */
@property (weak, nonatomic) IBOutlet UIImageView *leftSex;
/**
 时间段
 */
@property (weak, nonatomic) IBOutlet UILabel *leftTime;
/**
 左边起点
 */
@property (weak, nonatomic) IBOutlet UILabel *leftStarLocation;
/**
 左边终点
 */
@property (weak, nonatomic) IBOutlet UILabel *leftEndLocation;



/**
 右边背景View
 */
@property (weak, nonatomic) IBOutlet UIView *rightBgView;
/**
 右边Title
 */
@property (weak, nonatomic) IBOutlet UILabel *rightTitle;
/**
 右边头像父视图
 */
@property (weak, nonatomic) IBOutlet UIView *rightSubHead;
/**
 右边头像
 */
@property (weak, nonatomic) IBOutlet UIImageView *rightHeadImage;
/**
 右边名字
 */
@property (weak, nonatomic) IBOutlet UILabel *rightName;
/**
 右边年龄
 */
@property (weak, nonatomic) IBOutlet UILabel *rightYear;
/**
 右边性别
 */
@property (weak, nonatomic) IBOutlet UIImageView *rightSex;
/**
 右边时间
 */
@property (weak, nonatomic) IBOutlet UILabel *rightTime;
/**
 右边起点
 */
@property (weak, nonatomic) IBOutlet UILabel *rightStarLocation;
/**
 右边终点
 */
@property (weak, nonatomic) IBOutlet UILabel *rightEndLocation;

/**
 中间类别图片
 */
@property (weak, nonatomic) IBOutlet UIImageView *categoryImage;

@property (nonatomic,strong) YFRecordModel * recordModel;
@end

@implementation HJTeamHeader
// H= 280
-(instancetype)init {
    if (self == [super init]) {
        self = [[NSBundle mainBundle] loadNibNamed:@"HJTeamHeader" owner:nil options:nil].firstObject;
    }
    return self;
}
-(void)awakeFromNib {
    [super awakeFromNib];
    [self.BGview rounded:UIRectCornerAllCorners radius:10];
    [self.leftBgView rounded:(UIRectCornerTopLeft | UIRectCornerBottomLeft) radius:10 borderColor:[UIColor colorWithHex:0xfe6a7f] borderWidth:1];
    [self.rightBgView rounded:(UIRectCornerTopRight | UIRectCornerBottomRight) radius:10 borderColor:[UIColor colorWithHex:0xfe6a7f] borderWidth:1];
    
    
    // 用户图片 圆角
    [self.leftHeadImage rounded:(UIRectCornerAllCorners) radius:26];
    // 图片外的圆环
    [self.leftSubHead rounded:(UIRectCornerAllCorners) radius:30 borderColor:[UIColor lightGrayColor] borderWidth:2];
    
     // 用户图片 圆角
    [self.rightHeadImage rounded:(UIRectCornerAllCorners) radius:26];
    // 图片外的圆环
    [self.rightSubHead rounded:(UIRectCornerAllCorners) radius:30 borderColor:[UIColor lightGrayColor] borderWidth:2];
}
// 数据赋值
-(void)loadHeadDataWithDic:(YFRecordModel *)model {
    self.recordModel = model;
//    self.letfTitle.text = model.title;
    
    
}

@end
